package businesslogic;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.util.ArrayList;

import po.CoursePo;

import dataservice.StudentFindCourseDS;

import vo.CourseVo;
import businesslogicservice.StudentFindCourseBLS;

public class StudentFindCourseBL implements StudentFindCourseBLS{	
	public ArrayList<CoursePo> getdata(){
		ArrayList<CoursePo> course=new ArrayList<CoursePo>();
		try {			
			StudentFindCourseDS courseList=(StudentFindCourseDS)Naming.lookup("//localhost:8888/a");
			course=courseList.getdata();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 	
		return course;
	}
	
	public ArrayList<CoursePo> getdata2(int studentNumber){
		ArrayList<CoursePo> course=new ArrayList<CoursePo>();
		try {			
			StudentFindCourseDS courseList=(StudentFindCourseDS)Naming.lookup("//localhost:8888/a");
			course=courseList.getdata2(studentNumber);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 	
		return course;
	}
}
